package com.nidu.demo.notice.convertor;

import com.nidu.demo.base.BaseConvertor;
import com.nidu.demo.convertor.MapStructConfig;
import com.nidu.demo.notice.dto.NoticeCO;
import com.nidu.demo.notice.mapper.dataobject.NoticeDO;
import com.nidu.demo.notice.model.Notice;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = MapStructConfig.class)
public interface NoticeConvertor extends BaseConvertor<NoticeDO, Notice, NoticeCO> {
    
    @Override
    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "createBy", ignore = true)
    @Mapping(target = "updateBy", ignore = true)
    NoticeDO toDataObject(Notice notice);

}
